﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace commodity.Models
{
    public class SecondCommodityMenu
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        [MaxLength(32)]
        [Required]
        public string Name { get; set; }
        [ForeignKey("FirstsCommodityMenuId")]
        public int FirstsCommodityMenuId { get; set; }
        [JsonIgnore]
        public FirstsCommodityMenu FirstsCommodityMenu { get; set; }
        public ICollection<SecondCommodityMenuCommodity> SecondCommodityMenuCommodities { get; set; } = new List<SecondCommodityMenuCommodity>();
    }
}
